<template>
	<div class="s1">
		<h1>我是Grandson组件</h1>
		<h3>我的玩具是：{{toy}}</h3>
		<button @click="$emit('get-toy',toy)">把玩具给Child2（我父亲）</button>
	</div>
</template>

<script>
	export default {
		name:'Grandson',
		data() {
			return {
				toy:'小猪佩奇'
			}
		},
	}
</script>

<style>
	.s1{
		background-color: green;
		padding: 20px;
	}
</style>